package com.atguigu.gulimall.order.utils;

import com.alibaba.ttl.TransmittableThreadLocal;
import com.atguigu.common.vo.MemberResp;

/**
 * @Description
 * @Author lhj
 * @Date 2024/5/2 10:38
 */
public class LoginUserUtils {

    public static TransmittableThreadLocal<MemberResp> transmittableThreadLocal = new TransmittableThreadLocal<>();
    
    public static void set(MemberResp memberResp) {
        transmittableThreadLocal.set(memberResp);
    }
    
    public static MemberResp get() {
        
        return transmittableThreadLocal.get();
    }
    
    public static void remove() {
        transmittableThreadLocal.remove();
    }
}
